The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventor(s), to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
Most of today's processors have multiple cores and utilize software that supports multithreading. In multithreading, multiple threads, or tasks, are occurring simultaneously. Multithread-enabled operating systems provide various blocking mechanisms that block parallel execution of “critical sections”. A critical section is a sequence of source code that accesses a resource that is shared among multiple threads but that should be accessed by a single thread at a time. When a set of operations from a single thread that needs to be executed together in a certain order access a critical section, concurrent access to the critical section by other threads that would upset consistency is blocked. For example, a task that performs data transfer to a device typically includes several operations that rely on exclusive access to a critical section to maintain consistency. While the task is executing the source code in the critical section, other tasks are blocked from access to the critical section.